<template>
<div>
  <el-table :data="memberList" border style="width: 100%">
    <el-table-column prop="uid" label="用户编号"></el-table-column>
    <el-table-column prop="nickname" label="昵称">
    </el-table-column>
    <el-table-column prop="phone" label="手机号">
    </el-table-column>
    <el-table-column prop="status" label="状态">
      <template slot-scope="scope">
        <el-tag type="primary" v-if="scope.row.status == 1">启用</el-tag>
        <el-tag type="danger" v-else>禁用</el-tag>
      </template>
    </el-table-column>
    <el-table-column label="操作">
      <template slot-scope="scope">
        <el-button size="mini" type="primary" @click="edit(scope.row.uid)"
          >编辑</el-button
        >
      </template>
    </el-table-column>
  </el-table>
   </div>
</template>

<script>
import {} from "../../util/axios"
import {mapGetters,mapActions} from "vuex" 
export default {
    computed:{
      ...mapGetters({
        memberList:"member/getMemberlist"
      })
    },
    methods:{
      ...mapActions({
        getMemberLists:"member/memberlistAction"
      }),
      //编辑事件
      edit(e){
         this.$emit("edit",e);
      }
    },
    mounted(){
      this.getMemberLists()
    },

};
</script>

<style lang="stylus" scoped></style>